<!--
  @author nowind
  @since 2018/10/19 08:59
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>配件类型管理</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        <span>配件管理</span>&nbsp;&nbsp;>
        <a lay-href="/part/category/first/list.action">配件分类</a>
    </blockquote>

    <div class="layui-card">

        <div class="layui-split">&nbsp;</div>

        <form method="post">
            <div class="layui-form" th:include="part/category/first/_query :: query "></div>
        </form>

        <div class="layui-card-body">
            <table id="zmn-part-category-first-table" lay-filter="zmn-part-category-first-table"></table>
        </div>

    </div>

</div>
<script type="text/javascript" th:inline="javascript">
    var permission = {
        hasEdit: [[${#authPermit.checkPermit('/part/category/first/addEdit.action')}]],
        hasStatus: [[${#authPermit.checkPermit('/part/category/first/ajax/updateStatus.action')}]],
    };

    layui.config({
        base: "/static/lay/",
        version: 202009091551
    }).extend({
        index: "lib/index",
        part_partCategory_first: "{/}/static/js/module/part/category/first/zmn.plat.part.category.first.list"
    }).use(['index', 'part_partCategory_first']);

</script>
<script type="text/html" id="zmn-part-category-first-table-tool">
    {{#  if(permission.hasStatus){ }}
    <div class="layui-btn-container">
        <div class="layui-btn-group">
            <button class="layui-btn layui-btn-sm" lay-event="start">启用</button>
            <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="stop">停用</button>
        </div>
    {{# } }}
    {{# if(permission.hasEdit){ }}
        <div class="layui-btn-group">
            <button type="button" class="layui-btn layui-btn-sm layui-btn-primary" lay-event="add">+新增</button>
        </div>
    </div>
    {{# } }}
</script>
<script type="text/html" id="zmn-part-category-first-table-bar">
    {{#  if(permission.hasEdit){ }}
    <a lay-event="detail" class="layui-btn layui-btn-xs ">编辑</a>
    {{# } }}
    <!--
    {{# if(d.status == 1){ }}<a lay-event="enable" class="layui-btn layui-btn-xs">启用</a>{{#}}}
    {{# if(d.status == 2){ }}<a lay-event="disable" class="layui-btn layui-btn-xs layui-btn-danger">禁用</a>{{#}}}-->
    <!--<a lay-event="second" class="layui-btn layui-btn-xs " lay-href="" lay-text>二级分类管理</a>-->
    <a lay-href="/part/category/second/list/{{d.categId}}.action" class="layui-btn layui-btn-xs" lay-text="二级分类管理">二级分类管理</a>
</script>
</body>
</html>